package com.qfmy.model.enums;

/**
 * @author 清风明月
 * @Package com.qfmy.model.enums
 * @date 2025/11//11
 * @description 音频的类型
 */
@SuppressWarnings("all")
public enum AudioType implements BaseEnum{
    REAL_PERSON(1, "真人"),
    AI(2, "Ai");

    private Integer code;
    private String name;

    AudioType(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    @Override
    public String getName() {
        return name;
    }

    /**
     * 根据code获取描述
     */
    public static String getMessageByCode(Integer code) {
        for (AudioType value : AudioType.values()) {
            if (value.code.equals(code)) {
                return value.name;
            }
        }
        return null;
    }

}
